package com.nmc.core.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.nmc.core.dto.search.SearchCriteria;


public class BaseDAO extends HibernateDaoSupport {

	List searchItems(Class clazz,  SearchCriteria sc ) {
		 Session session = this.getSession();
	     Criteria c = session.createCriteria(clazz);
	     sc.addRestrictions(c);
	     List sList = c.list();
		 return sList;
	}

	
}
